package com.lhd.qd.module.system.resource.model.converter;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lhd.qd.module.system.resource.model.dataobj.ResourceDO;
import com.lhd.qd.module.system.resource.model.dto.ResourceSaveDTO;
import com.lhd.qd.module.system.resource.model.vo.MenuTreeVO;
import com.lhd.qd.module.system.resource.model.vo.ResourceListVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

@Mapper
public abstract class AbstractResourceConverter {

    public static AbstractResourceConverter INSTANCE = Mappers.getMapper(AbstractResourceConverter.class);

    public abstract Page<ResourceListVO> doPage2ListVOPage(IPage<ResourceDO> doPage);

    public abstract ResourceListVO do2ListVO(ResourceDO dataObj);

    public abstract ResourceDO saveDTO2DO(ResourceSaveDTO saveDTO);

    public abstract MenuTreeVO do2MenuVO(ResourceDO dataObj);
}
